package com.jintian.smart.base.api.system.entity;

import com.jintian.smart.kernel.core.domain.IEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.beetl.sql.annotation.builder.FillStrategy;
import org.beetl.sql.annotation.builder.UpdateTime;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Table;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 单据序列号 表结构
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "sys_serial_number_record")
public class SerialNumberRecordEntity implements IEntity {
    /**
     * 单号id
     */
    @AssignID("snowid")
    private Integer serialNumberId;

    /**
     * 记录日期
     */
    private LocalDate recordDate;

    /**
     * 最后更新值
     */
    private Long lastNumber;

    /**
     * 上次生成时间
     */
    private LocalDateTime lastTime;

    /**
     * 数量
     */
    private Long count;

    @UpdateTime(FillStrategy.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @UpdateTime(FillStrategy.INSERT)
    private LocalDateTime createTime;
}
